<!DOCTYPE html>
<html>
<head>
  <title>ForumDemo</title>
  <%= csrf_meta_tags %>

  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

</head>

<body>
<header class="navbar navbar-fixed-top navbar-inverse">
  <div class="navbar-inner">
    <div class="container">
      <nav>
        <span style="color: red"><%= t(:systemname)%></span>
        <ul class="nav pull-right">
          <li><%= link_to t(:forum), posts_path %>
            <% if user_login_in? && current_user.admin %>
              <li><%= link_to t(:user), users_path %>
              <li><%= link_to t(:type), post_types_path %>
          <% end %>
          <% if user_login_in? %>
              <li><%= link_to t(:account), user_path(@current_user) %>
          <% end %>
            <% if !user_login_in? %>
              <li><%= link_to t(:signin), login_path %>
          <% else %>
              <li><%= link_to t(:signup), logout_path %>
          <% end %>

        </ul>
      </nav>
    </div>


  </div>
</header>

<div class="container center">
  <% flash.each do |message_type, message| %>
      <%= content_tag(:div, message, class: "alert alert-#{message_type}") %>
  <% end %>
  <%= t(:hello)%>
  <%= yield %>
</div>
<%= yield :scripts %>
</body>
</html>
